SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[CategoriasInsertCommand]
(
	@ID numeric(10, 0),
	@CATEGORIA varchar(100),
	@ACTIVO bit
)
AS
	SET NOCOUNT OFF;
	
	DECLARE @I NUMERIC(10,0) = (SELECT(ISNULL(MAX([CATEGORIAS].ID),0))+1 FROM [CATEGORIAS]);
INSERT INTO [CATEGORIAS] ([ID], [CATEGORIA], [ACTIVO]) VALUES (@I, @CATEGORIA, @ACTIVO);
	
SELECT ID, CATEGORIA, ACTIVO FROM CATEGORIAS WHERE (ID = @I)
GO
